package com.link2room.rodimus.entity;

import com.link2room.common.entity.BaseEntity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by LN on 2017/7/28.8:28
 */
@Entity
@Table(name = "express_base")
public class ExpressBaseEntity extends BaseEntity {
    private String receiverName;
    private String mobile;
    private String sourceType;
    private String sourceNo;
    private String expressNo;
    private String goodCode;
    private Integer goodAmount;
    private String address;
    private String isDelivered;
    private String thirdExpressNo;
    private String expressCompany;
    private String memberNo;
    private String openid;

    private String goodName;
    private String remark;

    @Basic
    @Column(name = "good_name")
    public String getGoodName() {
        return goodName;
    }

    public void setGoodName(String goodName) {
        this.goodName = goodName;
    }
    @Basic
    @Column(name = "remark")
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Basic
    @Column(name = "receiver_name")
    public String getReceiverName() {
        return receiverName;
    }

    public void setReceiverName(String receiverName) {
        this.receiverName = receiverName;
    }

    @Basic
    @Column(name = "mobile")
    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    @Basic
    @Column(name = "source_type")
    public String getSourceType() {
        return sourceType;
    }

    public void setSourceType(String sourceType) {
        this.sourceType = sourceType;
    }

    @Basic
    @Column(name = "source_no")
    public String getSourceNo() {
        return sourceNo;
    }

    public void setSourceNo(String sourceNo) {
        this.sourceNo = sourceNo;
    }

    @Basic
    @Column(name = "express_no")
    public String getExpressNo() {
        return expressNo;
    }

    public void setExpressNo(String expressNo) {
        this.expressNo = expressNo;
    }

    @Basic
    @Column(name = "good_code")
    public String getGoodCode() {
        return goodCode;
    }

    public void setGoodCode(String goodCode) {
        this.goodCode = goodCode;
    }

    @Basic
    @Column(name = "good_amount")
    public Integer getGoodAmount() {
        return goodAmount;
    }

    public void setGoodAmount(Integer goodAmount) {
        this.goodAmount = goodAmount;
    }

    @Basic
    @Column(name = "address")
    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    @Basic
    @Column(name = "is_delivered")
    public String getIsDelivered() {
        return isDelivered;
    }

    public void setIsDelivered(String isDelivered) {
        this.isDelivered = isDelivered;
    }

    @Basic
    @Column(name = "third_express_no")
    public String getThirdExpressNo() {
        return thirdExpressNo;
    }

    public void setThirdExpressNo(String thirdExpressNo) {
        this.thirdExpressNo = thirdExpressNo;
    }

    @Basic
    @Column(name = "express_company")
    public String getExpressCompany() {
        return expressCompany;
    }

    public void setExpressCompany(String expressCompany) {
        this.expressCompany = expressCompany;
    }

    @Basic
    @Column(name = "member_no")
    public String getMemberNo() {
        return memberNo;
    }

    public void setMemberNo(String memberNo) {
        this.memberNo = memberNo;
    }

    @Basic
    @Column(name = "openid")
    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        ExpressBaseEntity that = (ExpressBaseEntity) o;

        if (receiverName != null ? !receiverName.equals(that.receiverName) : that.receiverName != null) return false;
        if (mobile != null ? !mobile.equals(that.mobile) : that.mobile != null) return false;
        if (sourceType != null ? !sourceType.equals(that.sourceType) : that.sourceType != null) return false;
        if (sourceNo != null ? !sourceNo.equals(that.sourceNo) : that.sourceNo != null) return false;
        if (expressNo != null ? !expressNo.equals(that.expressNo) : that.expressNo != null) return false;
        if (goodCode != null ? !goodCode.equals(that.goodCode) : that.goodCode != null) return false;
        if (goodAmount != null ? !goodAmount.equals(that.goodAmount) : that.goodAmount != null) return false;
        if (address != null ? !address.equals(that.address) : that.address != null) return false;
        if (isDelivered != null ? !isDelivered.equals(that.isDelivered) : that.isDelivered != null) return false;
        if (thirdExpressNo != null ? !thirdExpressNo.equals(that.thirdExpressNo) : that.thirdExpressNo != null)
            return false;
        if (expressCompany != null ? !expressCompany.equals(that.expressCompany) : that.expressCompany != null)
            return false;
        if (memberNo != null ? !memberNo.equals(that.memberNo) : that.memberNo != null) return false;
        if (openid != null ? !openid.equals(that.openid) : that.openid != null) return false;
        if (goodName != null ? !goodName.equals(that.goodName) : that.goodName != null) return false;
        return remark != null ? remark.equals(that.remark) : that.remark == null;
    }

    @Override
    public int hashCode() {
        int result = receiverName != null ? receiverName.hashCode() : 0;
        result = 31 * result + (mobile != null ? mobile.hashCode() : 0);
        result = 31 * result + (sourceType != null ? sourceType.hashCode() : 0);
        result = 31 * result + (sourceNo != null ? sourceNo.hashCode() : 0);
        result = 31 * result + (expressNo != null ? expressNo.hashCode() : 0);
        result = 31 * result + (goodCode != null ? goodCode.hashCode() : 0);
        result = 31 * result + (goodAmount != null ? goodAmount.hashCode() : 0);
        result = 31 * result + (address != null ? address.hashCode() : 0);
        result = 31 * result + (isDelivered != null ? isDelivered.hashCode() : 0);
        result = 31 * result + (thirdExpressNo != null ? thirdExpressNo.hashCode() : 0);
        result = 31 * result + (expressCompany != null ? expressCompany.hashCode() : 0);
        result = 31 * result + (memberNo != null ? memberNo.hashCode() : 0);
        result = 31 * result + (openid != null ? openid.hashCode() : 0);
        result = 31 * result + (goodName != null ? goodName.hashCode() : 0);
        result = 31 * result + (remark != null ? remark.hashCode() : 0);
        return result;
    }
}
